﻿using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 触发元素数据
/// </summary>
public class TriggerElementData
{
    private float _gauge;

    /// <summary>
    /// 源
    /// </summary>
    public GameObject Source { get; set; }

    /// <summary>
    /// 元素类型
    /// </summary>
    public ElementType ElementType { get; set; }

    /// <summary>
    /// 元素量
    /// </summary>
    public float Gauge
    {
        get => _gauge;
        set => _gauge = value < 0f ? 0f : value;
    }

    /// <summary>
    /// 是否已触发，触发则不附着元素
    /// </summary>
    public bool IsTriggered { get; set; }

    /// <summary>
    /// 伤害增幅器
    /// </summary>
    public List<ElementDamageBooster> DamageBoosters { get; } = new();

    /// <summary>
    /// 用来判断碎冰
    /// </summary>
    public StrikeType StrikeType { get; set; }
}